1. Field of the Invention
The present invention generally relates to data processing systems and more particularly relates to data processing systems that process successive database requests.
2. Description of the Prior Art
With the rapid advancement of modern electronics, data processing systems have found many new and useful applications. Today, almost every industry sector uses some form of data processing system on a daily basis. The banking industry, for example, uses mainframe type data processing systems to maintain large accounting databases, and to manage the large number of banking transactions that occur every day. The manufacturing industry uses data processing systems to maintain process flows, and manage inventory. Engineering and scientific applications are self evident. Even in the home, personal computers have become widely used.
Many of these applications require the user to provide user requests to a database. In the banking industry, for example, a teller may request the balance of a particular account. The system may process the teller""s request by accessing a database, and deliver the requested information to the teller. Likewise, in the manufacturing industry, a user may request the inventory for a particular item.
Some applications access static databases. A static database is one that does not change during a particular user session. Thus, when using a static database, two identical user requests that are submitted at different times always will provide the same result.
It is recognized that a static database may be updated periodically. However, the user is typically aware of these updates. In addition, user requests are typically not allowed while the database is changed. An example of a static database is a survey database. A survey database includes survey results that are obtained from a survey of, for example, selected customers. Since new surveys are often only conducted on a periodic basis (e.g. one per month), the survey database remains static between updates. When a new survey is conducted, an updated survey database can be provided. Static databases are often read-only databases.
Other applications access dynamic databases. A dynamic database is one that may change at any time, without providing notice to the user. Thus, when two identical requests are run at different times, the same results may or may not be obtained. One example of a dynamic database is a transactional database, where a number of users are reading and writing updated data to the database. Dynamic databases are often read/write databases.
When a user request is submitted to either a dynamic or static database, many computer applications process the request by reading the appropriate data elements from the database and generate the requested results therefrom. A limitation of many of these systems is that each user request is processed independently from all other user requests, including previous user requests.
It has been found that some user requests may be able to use some or all of the results generated by a previous user request. Thus, user requests that operate strictly independently of one another may not operate at an optimum speed. For example, in prior art systems, a subsequent user request typically may regenerate the results that have already been generated by a previous user request. Thus, it would be advantageous to provide a system whereby prior results are used in the processing of a subsequent request, where appropriate.
The present invention overcomes many of the disadvantages of the prior art by providing a method and apparatus for using prior results when processing successive database requests. This is preferably accomplished by storing selected results during the processing of selected user requests. When a subsequent user request is processed, the system may determine if appropriate prior results have already been generated and stored by a previous user request. If so, the prior results may be used in the processing of the subsequent user request. It is recognized that some additional processing may be required to fully process the subsequent user request. However, because the prior results are not regenerated, the processing time for the subsequent user request may be reduced. The term xe2x80x9cresultsxe2x80x9d, as used herein, includes data elements that are read from the database, intermediate results, temporary results, final results, or any other type of data that are produced during the processing of a user request.
In a preferred embodiment, the present invention operates on a static database, and in particular, a survey database. However, it is contemplated that the present invention may operate on a dynamic database. To operate on a dynamic database, the additional step of checking the previously generated results to ensure that they are still valid must be performed before using the results. This may still provide a performance enhancement over prior art systems.
In a preferred embodiment, a number of analysis requests are sequentially executed. Each of the analysis requests include a number of database queries to a database, and each of the number of database queries provides a result. The database queries that are required for a selected analysis request are then determined. Thereafter, it is determined if any of the database queries that are required for the selected analysis request have already been executed by a previous sequentially executed analysis request. This may be accomplished by searching the previous database queries. If one or more of the database queries that are required for the selected analysis request have already been executed, the results of selected previously executed database queries are used when executing the selected analysis request.
In another illustrative embodiment, a first user request is accepted, wherein the first user request requires a first analysis of the database. The first user request is then executed, thus performing the first analysis of the database, and providing a first result. The first result is then stored for later reference. A second user request is then accepted, wherein the second user request requires a second analysis of the database. The second analysis requiring the performance of the first analysis and a third analysis. The second user request is executed, thus performing the second analysis of the database. To perform the second analysis of the database, the third analysis is performed to provide a third result. The third result and the first result are then used to provide the second result. As can readily be seen, the second analysis does not regenerate the first result, at least in this instance.
In another illustrative embodiment, the database is a survey database. The user requests are received by an interface module, and are provided to a knowledge module. The knowledge module preferably assembles a number of appropriate data requests by executing a number of rules in a rules-based expert system. The number of data requests are then submitted to a survey analysis program, which executes the data requests and provides a number of intermediate results. The knowledge module then preferably stores the intermediate results for later reference, and provides the requested result to the interface module. When providing the requested result, the knowledge module may process the intermediate results and provide temporary results. The temporary results may also be stored for later reference.
When a subsequent user request is submitted, the knowledge module again assembles a number of data requests. However, before providing the data requests to the survey analysis program, the knowledge module may determine if any of the data requests have already been executed by a previous request. If so, the knowledge module preferably only submits those data requests that have not been executed by a previous user request to the survey analysis program. The survey analysis program executes the data requests, and provides the corresponding intermediate results to the knowledge module. Using the prior results, along with the newly generated intermediate results, the knowledge module provides the requests results to the user via the interface module. As described below, it is contemplated that the knowledge module may submit data requests directly to the survey database, rather than using a survey analysis program.
It is contemplated that the present invention may be implemented using software, hardware or a combination thereof. When implemented in hardware, the system preferably includes interface module for accepting a first user request, wherein the first user request requires a first analysis of the database. The system further preferably includes execution module for performing the first analysis of the database, and providing a first result. Finally, the system preferably includes storage module for storing the first result.
The interface module may then accept a second user request, wherein the second user request requires a second analysis of the database. The second analysis requiring the performance of the first analysis and a third analysis. The execution module performs the second analysis of the database by performing the third analysis, and using the first result to provide the desired second result.